/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ru.jSky.support;

import ru.jSky.interfaces.Armor;
import ru.jSky.interfaces.Enchantment;
import ru.jSky.interfaces.FormList;
import ru.jSky.interfaces.Major;
import skyproc.GRUP_TYPE;

/**
 *
 * @author Rakev
 */
public class GrupTypeFactory {

    public static GRUP_TYPE create(Major entity) {
        if (entity instanceof Armor) {
            return GRUP_TYPE.ARMO;
        }
        if (entity instanceof Enchantment) {
            return GRUP_TYPE.ENCH;
        }
        if (entity instanceof FormList) {
            return GRUP_TYPE.FLST;
        }
        throw new IllegalArgumentException("" + entity + " not supported yet.");
    }
}
